
from django.contrib import admin
from django.urls import path
from django.conf.urls import url
from django.views.static import serve
from myblog import settings
from app01 import views
urlpatterns = [
    path('admin/', admin.site.urls),
    path('register/', views.register, name='reg'),
    path('login/', views.login, name='login'),
    #图片验证码
    path('get_code/',views.get_code),
    #首页
    path('home/',views.home),
    #退出登录
    path('logout/',views.logout,name='logout'),
    #暴露后端指定文件夹资源
    url(r'^media/(?P<path>.*)', serve, {'document_root': settings.MEDIA_ROOT}),
    #个人站点页面搭建
    url(r'^(?P<username>\w+)/$',views.site,name='site'),
]
